const net = require('net')

const server = net.createServer()
server.listen(1234, () => {
  console.info(`服务端启动了 http://localhost:1234`)
})

server.on('connection', (socket) => {
  socket.on('data', (chunk) => {
    console.info(chunk.toString())

    socket.end('Hello Http request')
  })
})
